import { Component, EventEmitter, Input, Output, OnInit, AfterViewInit } from '@angular/core';
import { animate, state, style, transition, trigger } from '@angular/animations';

declare let $;

@Component({
    selector: 'round-toggle-button',
    template: `
    <!-- 替代checkbox的toggle类型按钮 -->
    <span class="fa" [style.font-size]="iconSize+'px'"
          [ngClass]="{'my-i-check-custom':toggleEnabled == true,'my-i-cancel-custom':toggleEnabled == false}" ></span>
    `,
    styleUrls: ['./round.toggle.button.component.css'],
    providers: [
    ]
})

export class RoundToggleButtonComponent implements OnInit, AfterViewInit {

    @Input('enabled') toggleEnabled: boolean = true;
    @Input('size') iconSize: number = 16;

    constructor() {
    }
    ngOnInit() {
    }
    ngAfterViewInit(): void {
    }
}
